<?php foreach ($journey as $key => $value) { ?>
  <?php echo '<p style="margin-left: 10px; font-size: 12px; font-weight: bold;">'.date('j F Y', strtotime($key)).'</p>'; ?>  
    <table class="item-list"> 
      <thead>
        <tr>
          <th>#</th>
          <th>Channel ID</th>
          <th>Channel Name</th>
          <th>Maintaned By</th>
          <th>Tipe Kunjungan</th>
        </tr>
      </thead>
      <tbody>
        <?php $x=1; foreach ($value as $key) { ?>
          <tr>
            <td><?php echo $x; ?></td>
            <td><?php echo $key->channel_id; ?></td>
            <td><?php echo $key->channel_name; ?></td>
            <td><?php echo $key->sales_id.' '.$key->sales_name.' ('.$key->user_group.')'; ?></td>
            <td><?php echo $key->journey_type; ?></td>
          </tr>
        <?php $x++; }?>
      </tbody>
    </table>
<?php } ?>